﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data.SqlClient;
using System.Globalization;
using System.ComponentModel.DataAnnotations;
using System.Web;
using System.Web.Mvc;
using System.Web.Security;

namespace DevMed.Models
{
    public class CadastroModels
    {
        [Required]
        [Display(Name = "Usuário")]
        public string UserName { get; set; }

        [Required]
        [DataType(DataType.EmailAddress)]
        [RegularExpression(@"\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*", ErrorMessage = "Informeum endereço de e-mail válido!")]
        [Display(Name = "E-mail")]
        public string Email { get; set; }

        [Required]
        [StringLength(100, ErrorMessage = "A {0} deve ter pelo menos {2} caracteres!", MinimumLength = 6)]
        [DataType(DataType.Password)]
        [Display(Name = "Senha")]
        public string Password { get; set; }

        [DataType(DataType.Password)]
        [Display(Name = "Confirme a senha")]
        [Compare("Password", ErrorMessage = "A senha e a confirmação estão diferentes. Verifique!")]
        public string ConfirmPassword { get; set; }
    }

    public class LoginModels
    {
        [Required]
        [Display(Name = "Usuário")]
        public string UserName { get; set; }

        [Required]
        [DataType(DataType.Password)]
        [Display(Name = "Senha")]
        public string Password { get; set; }

        [Display(Name = "Lembrar-me?")]
        public bool RememberMe { get; set; }
    }

    public class MinhasEstatisticasModels
    {
        public MembershipUser DataCriacao { get; set; }
        public MembershipUser Ativo { get; set; }
        public MembershipUser DataUltimaAtividade { get; set; }
        public MembershipUser DataUltimoLogin { get; set; }
        public MembershipUser DataUltimaMudancaSenha { get; set; }
        public MembershipUser Codigo { get; set; }
    }
}